<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>讨论(<?php echo $result['count']?>)</title>
        <meta name="viewport" content="initial-scale=1, maximum-scale=1">
        <!--<link rel="shortcut icon" href="/favicon.ico">-->
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <meta name="format-detection" content="address=no">
        <meta name="format-detection" content="email=no">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="stylesheet" href="<?php echo C('STATIC_SHORT_URL');?>/mobile/css/common.css?v=1.0">
        <link rel="stylesheet" href="<?php echo C('STATIC_SHORT_URL');?>/mobile/css/pinglun.css?v=5.7.8">
        <style>
            header{height:0.8rem;text-align:center;line-height:0.8rem;position:relative;font-size: 0.3rem; color:black;}
            header .onBack{width:0.4rem;height:0.4rem;border:2px solid black ;border-top:none;border-right:none;position:absolute;top:70%;left:5%;margin-top:-0.4rem;-webkit-transform:rotate(45deg);transform:rotate(45deg);}
            header a{text-decoration:none;color:black; height: 0.8rem;display: block ;width: 100%;text-align: center; }
            .number{
                height: 0.8rem;
                color:#797979;
            }
            .tl{
                height: 0.8rem;
            }
        </style>
    </head>
    <body>
      <!--    <header>
          <a class="onBack" href="javascript:history.back();"></a>
          <a href="javascript:;" class="tl">讨论 <span class="number">(<?php echo $result['count']?>)</span></a>
      </header>-->
    <section>
            <?php if(!empty($result['list'])){ ?>

                 <?php foreach($result['list'] as $k =>$v){?>
                 <?php if($v['reply_id'] >0){?>
                 <div class="part_two part_one sss" reply_id="<?php echo $v['uid'];?>" remove_id="<?php echo $v['id']?>">
                      <div class="xxx"><img src="__IMAGES__/topic/xxx.png"></div>
                      <div class="left"><img src="<?php echo $v['header_img']; ?>"></div>
                      <div id="right"  >
                          <b><?php echo $v['user_name']; ?></b>
                          <?php if($v['level']){?>
                           <h5 id="name" style="color:white;margin: 0;font-size: 0.2rem" ><?php echo $v['level'];?></h5>
                          <?php }?>
                          <span><?php echo $v['announce_time'];?></span>
                          <p  style="margin-top: 0.17rem;margin-bottom: 0.25rem">回复<a href="javascript:;" style="color:#ffbb79;font-size: 0.3rem;" ><?php echo $v['reply_user_name']?></a><?php echo $v['content']?></p>
                      </div>
                 </div>
               <?php }else{?>
                  <div class="part_one sss" reply_id="<?php echo $v['uid'];?>" remove_id="<?php echo $v['id']?>">
                     <div class="xxx"><img src="__IMAGES__/topic/xxx.png"></div>
                     <div class="left" style="border-radius: 50%;" > <img src="<?php echo $v['header_img']; ?>"  ></div>
                     <div class="right"  >
                         <b><?php echo $v['user_name']; ?></b>
                         <?php if($v['level']){?>
                          <h5 id="name1" style="color:white;margin: 0;font-size: 0.2rem" ><?php echo $v['level'];?></h5>
                         <?php }?>
                         <span id="timer" ><?php echo $v['announce_time'];?></span>
                         <p style="margin-top: 0.8rem;font-size: 0.3rem" ><?php echo $v['content']?></p>
                     </div>
                 </div>
               <?php } ?>
          <?php }?>


          <?php }else {?>
            <div class="empty" >
                  <img src="<?php echo C('STATIC_SHORT_URL') . '/mobile/images/topic/empty1.png'?>" alt="" style="width: 3.58rem;height:1.7rem;" >
                  <span style="display: block ;width:100%;color:#dcdcdc;height:0.3rem;font-size: 0.3rem;text-align: center " >暂时没有评论哦~</span>
              </div>
          <?php }?>
    </section>

    <div style = "height:1rem"></div>

    

      <input type="hidden"  id="api"  value="topic/comment"/>
      <input type="hidden"  id="cid"  value="<?php echo $_GET['id'] ;?>"/>
      
     <?php if(versionCompare($version, '1.3.0', '<=')) {?>
     <footer>
         <span class="bo_picture"></span>
         <input type="text "autocomplete="off" autocorrect="off" placeholder="输入发表你的观点吧！..." >

         <a href="javascript:;" class="sent">发表</a>
     </footer>
     <?php }?>
    </body>
<script type="text/javascript" src="<?php echo C('STATIC_SHORT_URL');?>/mobile/js/jquery-1.7.1.js"></script> 


<script>
//rem自适应代码
    (function(doc, win) {
        var docEl = doc.documentElement,
                resizeEvt = 'onorientationchange' in window ? 'onorientationchange' : 'resize',
                recalc = function() {
                    var clientWidth = docEl.clientWidth;
                    if (!clientWidth)
                        return;
                    if (clientWidth >= 750) {
                        docEl.style.fontSize = '100px';
                    } else {
                        docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
                    }
                };

        if (!doc.addEventListener)
            return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);
</script>


<script>
   function jsonData() {
        var json = {
            "id" : <?php  echo $_GET['id'] ?> , 
            "user_flag":  <?php echo $user_flag;?> , //当前登录者的状态，是管理员还是用户
        }
    return json;
  }
</script>  

<!--版本判断:-->
    <?php if(versionCompare($version, '1.3.0', '<=')) {?>
        <script type="text/javascript" src="<?php echo C('STATIC_SHORT_URL');?>/mobile/js/comment.js?v=1.3"></script>    
    <?php }else {?>
        <script type="text/javascript" src="<?php echo C('STATIC_SHORT_URL');?>/mobile/js/comment1.js?v=1.8"></script>   
    <?php }?>

</html>
